package com.nj.core.base.validator;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.ReportAsSingleViolation;
import javax.validation.constraints.NotNull;

import java.lang.annotation.*;

@Target ({ElementType.METHOD,ElementType.FIELD, ElementType.ANNOTATION_TYPE,
	ElementType.CONSTRUCTOR,ElementType.PARAMETER})
@Retention (RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy={NotBlankValidator.class})
@NotNull
@ReportAsSingleViolation
public @interface NotBlank {
	String message() default "{com.nj.validation.NotBlank.message}";
	Class<?>[] groups() default{};
	Class<? extends Payload>[] payload() default{};
	@Target ({ElementType.METHOD,ElementType.FIELD, ElementType.ANNOTATION_TYPE,
		ElementType.CONSTRUCTOR,ElementType.PARAMETER})
	@Retention (RetentionPolicy.RUNTIME)
	@Documented
	static @interface List {
		NotBlank[] value();
	}

}
